﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class ajax_topic_save : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            string userid = Request["userid"].ToString();
            string topictitle = Request["topictitle"].ToString();
            string topiccontent = Request["topiccontent"].ToString();
            topiccontent = topiccontent.Replace("'", "\"");

            TBBSTopic oTopic = new TBBSTopic();
            oTopic.TopicTitle = topictitle;
            oTopic.TopicContent = topiccontent;
            oTopic.TopicBID = "00000000-0000-0000-0000-000000000000";
            oTopic.TopicAuthor = userid;
            oTopic.Insert();
            //---
            Response.End();
        }
    }
}
